package com.xmy.cultivate.feign.math;

import com.xmy.cultivate.entity.views.EduTask;
import com.xmy.cultivate.entity.views.MathChaPlan;
import com.xmy.cultivate.entity.views.PassRadeViews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "math-outside")
public interface IFeiMathFeignClient {

    @GetMapping("/api/outside/chaPlan/getPassRadeDetailForStudentId")
    public List<MathChaPlan> getPassRadeDetailForStudentId(
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "studentId", required = false) String studentId,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "yetLessonNumStr", required = false) String yetLessonNumStr
    );

    @GetMapping("/api/outside/chaPlan/getNeedOrder")
    public Map<String,Object> getNeedOrder(@RequestParam("pageNum") Integer pageNum,
                                           @RequestParam("pageSize") Integer pageSize,
                                           @RequestParam("yearPart") Integer yearPart,
                                           @RequestParam("quarterNum") Integer quarterNum,
                                           @RequestParam("schoolId") Long schoolId,
                                           @RequestParam("lessonType") Integer lessonType,
                                           @RequestParam("subjectsId") Long subjectsId,
                                           @RequestParam(value = "yearClassId",required = false) Integer yearClassId,
                                           @RequestParam(value = "classTypeId",required = false) Long classTypeId,
                                           @RequestParam(value = "goodsTypeId",required = false) Long goodsTypeId);

    /**
     *
     * @return
     */
//    @PostMapping("/api/outside/chaPlan/getPassRadeListAdmin")
//    public List<MathChaPlan> getPassRadeListAdmin(@RequestBody PassRadeViews passRade);

    //任务表 学习到的课次 最大一条
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumberMax",method= RequestMethod.POST)
    public EduTask getTaskNumberMax(@RequestBody EduTask eduTask);

    @GetMapping("/api/outside/eduTask/getTaskNowMaxLessonNum")
    public Integer getTaskNowMaxLessonNum(@RequestParam(value = "yearPart",required = false,defaultValue = "0") String yearPart,
                                    @RequestParam(value = "quarterNum",required = false,defaultValue = "0") String quarterNum,
                                    @RequestParam(value = "subjectsId",required = false,defaultValue = "0") String subjectsId,
                                    @RequestParam(value = "courseVersionId",required = false,defaultValue = "1676874588501311488") Long courseVersionId,
                                    @RequestParam(value = "categoryId",required = false,defaultValue = "1") Integer categoryId);

}
